#include "StaticDispatcher.h"
#include "Dispatched.h"

int main()
{
	typedef StaticDispatcher<HatchingExecutor,Shape,TYPELIST_3(Rectangle,Ellipse,Poly)> Dispatcher;
	Shape *p1 = new Poly;
	Shape *p2 = new Ellipse;
	Shape *p3 = new Rectangle;
	HatchingExecutor exec;
	try{
		Dispatcher::Go(*p1,*p2,exec);
		Dispatcher::Go(*p2,*p3,exec);
	}
	catch(std::exception &e) {
		std::cout << e.what() << std::endl;
	}
}